﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TH_GIO_HANG.ascx.cs" Inherits="The_hien_TH_GIO_HANG" %>


<%@ Register src="TH_THONG_TIN_DON_HANG.ascx" tagname="TH_THONG_TIN_DON_HANG" tagprefix="uc1" %>

<asp:Panel ID="PanelCoGH" runat="server">
    <table cellpadding="0" cellspacing="0" width="580">
        <tr>
            <td width="580" colspan="2" align="center" bgcolor="#66CCFF">
                GIỎ HÀNG CỦA BẠN</td>
        </tr>
        <tr>
            <td width="580" colspan="2" align="center">
                <asp:GridView ID="gview_giohang" runat="server" AutoGenerateColumns="False" 
                    ondatabound="gview_giohang_DataBound" 
                    onrowcancelingedit="gview_giohang_RowCancelingEdit" 
                    onrowcommand="gview_giohang_RowCommand" 
                    onrowdeleting="gview_giohang_RowDeleting" 
                    onrowediting="gview_giohang_RowEditing" 
                    onrowupdating="gview_giohang_RowUpdating" 
                    onselectedindexchanged="gview_giohang_SelectedIndexChanged" ShowFooter="True" 
                    style="TEXT-ALIGN: center" Width="580px">
                    <Columns>
                        <asp:BoundField DataField="Ten_sach" HeaderText="Tên sách" ReadOnly="True">
                        <ItemStyle HorizontalAlign="Left" Width="35%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="So_luong" HeaderText="Số lượng">
                        <ItemStyle Width="5%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Don_gia" DataFormatString="{0:#,### VND}" 
                            HeaderText="Đơn giá" ReadOnly="True">
                        <ItemStyle HorizontalAlign="Left" Width="20%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Thanh_tien" DataFormatString="{0:#,## VND}" 
                            HeaderText="Thành tiền" ReadOnly="True">
                        <ItemStyle HorizontalAlign="Left" Width="20%" />
                        </asp:BoundField>
                        <asp:CommandField ButtonType="Image" CancelImageUrl="~/Hinh/Cancel.jpg" 
                            CancelText="Không" DeleteImageUrl="~/Hinh/delete.gif" 
                            EditImageUrl="~/Hinh/Edit.png" EditText="Sửa" ShowDeleteButton="True" 
                            ShowEditButton="True" UpdateImageUrl="~/Hinh/Save.jpg" UpdateText="Ghi" 
                            CausesValidation="False">
                        <ItemStyle Width="10%" Wrap="False" />
                        </asp:CommandField>
                        <asp:TemplateField Visible="False">
                            <HeaderTemplate>
                                <asp:Button ID="btn_xoa" runat="server" CommandName="xoa" 
                                    OnClientClick="return confirm('Bạn có chắc chắn xóa không?')"
                                    onclick="btn_xoa_Click" Text="Xóa" Width="36px" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chk_xoa" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:CheckBox ID="chk_all" runat="server" 
                                    onclick="javascript: return select_deselectAll(this.checked, this.id);" />
                            </HeaderTemplate>
                            <FooterTemplate>
                                <asp:Button ID="btn_xoaall" runat="server" CommandName="xoaall" Text="Xóa" 
                                    CausesValidation="False" />
                            </FooterTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chk_item" runat="server" 
                                    onclick="javascript: return select_deselectAll(this.checked, this.id);" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="right" width="280">
                Tổng số tiền: </td>
            <td width="300">
                <asp:Label ID="lbl_tongtien" runat="server" Text="Label"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="right">
                Tổng số cuốn sách: </td>
            <td>
                <asp:Label ID="lbl_tonghang" runat="server" Text="Label"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btn_dat_hang" runat="server" onclick="btn_dat_hang_Click" 
                    Text="Đặt hàng" CausesValidation="False" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                Đăng nhập để có thể đặt hàng&nbsp;</td>
        </tr>
    </table>
    <div style="width:580px">
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" Width="580px" />
    </div>
    <div style="width:580px">
        <asp:Panel ID="PanelTTDonHang" runat="server" Visible="False">
            <uc1:TH_THONG_TIN_DON_HANG ID="TH_THONG_TIN_DON_HANG1" runat="server" />
        </asp:Panel>
    </div>
</asp:Panel>
<asp:Panel ID="PanelKoGH" runat="server">
    <span style="font-size: x-large">
    <br />
            Bạn chưa chọn sản phẩm nào vào giỏ hàng
        </span>
</asp:Panel>